#include <iostream>

using namespace std;

struct Hero{
	char name[64];
	int sex;
};

void printHero(struct Hero& h){
	cout << h.name << " -- " << h.sex << endl;
}

class AdvHero{
// 访问控制权，在类的内部，外部都可以访问
public:
	char name[64];
	int sex;
	void printHero(){
		cout << name << " -- " << sex << endl;
	}
// 只能在类的内部访问
private:
	char colors[64];

};


int main(int argc, char *argv[]) {

	Hero h;
	strcpy(h.name,"gun1");
	h.sex = 1;
	printHero(h);

	AdvHero advH;
	strcpy(advH.name,"gun2");
	advH.sex = 2;
	advH.printHero();

	return 0;
}
